<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        border: solid 2px;
        padding: 10px;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <a href="/a.html" @click.prevent="say('hello')">hello</a>
      <div @click="say(1)" @click.capture="say(1)">
        1
        <div @click="say(2)" @click.capture="say(2)">2
          <div @click.stop="say(3)" @click.capture="say(3)">3
            <div @click.stop="say(4)" @click.capture="say(4)">4</div>
          </div>
        </div>
      </div>
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {},
        methods: {
          say(ctx) {
            console.log(ctx);
          },
          print: function (e) {
            console.log(e);
          },
        },
      });
    </script>
  </body>
</html>
